const defaultState = {
  isLoading: false
}
// eslint-disable-next-line import/no-anonymous-default-export
export const LoadingReducer = (state = defaultState, action) => {
  let newState = JSON.parse(JSON.stringify(state))
  if (action.type === 'change_loading') {
    newState.isLoading = action.value
    return newState
  }
  return state
}